<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>后台管理</title>
    <link rel="stylesheet" href="css/bootstrap.min.css" />
    <link rel='stylesheet' href='css/style.css' />
    <link rel='stylesheet' href='css/bootstrap-datetimepicker.min.css' />
    <link rel='stylesheet' href='css/bootstrapValidator.min.css' />
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <script type="text/javascript" src="js/jquery.tmpl.min.js"></script>
    <script type="text/javascript" src="js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="js/bootstrapValidator.min.js"></script>
    <script type="text/javascript" src="js/bootstrap-paginator.min.js"></script>
    <script type="text/javascript" src="js/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="js/dataTables.bootstrap.min.js"></script>
    <script type="text/javascript" src="js/base64.js"></script>

</head>
<body>
  <nav id="header" class="navbar navbar-default navbar-fixed-top">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse-1" aria-expanded="false">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a href="#" class="logo"><img src=""> 荔枝直播 <span class="label label-danger">v1.2</span></a>
    </div>
    <div class="collapse navbar-collapse" id="navbar-collapse-1">
        <ul class="nav navbar-nav navbar-right">
          <li><a href="#"><span class="glyphicon glyphicon-user"></span> admin</a></li>
          <li><a href="#" data-toggle="modal" data-target="#modal_changepwd"><span class="glyphicon glyphicon-lock"></span> 修改密码</a></li>
          <li><a href="/loginout"><span class="glyphicon glyphicon-log-out"></span> 退出</a></li>
        </ul>
    </div>
  </div>
</nav>
<div class="container-fluid">
  <div class="row">
    <div class="sidebar">
      <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
  <!--待用编号-->
<!--   
    <div class="panel panel-default">
      <div class="panel-heading" role="tab" id="headingOne">
        <h4 class="panel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapse0" aria-expanded="false" aria-controls="collapseOne"><span class="glyphicon glyphicon-th-large"></span>  待用编号 <span class="caret"></span></a></h4>
      </div>
      <div id="collapse0" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="collapse0">
        <div class="list-group">
          
          
        </div>
      </div>
    </div>
   -->
  <!--1充值明细-->
  
    <div class="panel panel-default">
      <div class="panel-heading" role="tab" id="headingTow">
        <h4 class="panel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapse1" aria-expanded="false" aria-controls="headingTow"><span class="glyphicon glyphicon-th-large"></span>  充值明细 <span class="caret"></span></a></h4>
      </div>
      <div id="collapse1" class="panel-collapse collapse" role="tabpanel" aria-labelledby="collapse1">
        <div class="list-group">
          
          <a href="recharge.html" class="list-group-item"><span class="glyphicon glyphicon-th-list"></span> 充值明细</a>
          

          
        </div>
      </div>
    </div>
  
  <!--2用户贡献明细-->
  
  <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingThree">
      <h4 class="panel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapse2" aria-expanded="false" aria-controls="headingThree"><span class="glyphicon glyphicon-hd-video"></span>  用户贡献 <span class="caret"></span></a></h4>
    </div>
    <div id="collapse2" class="panel-collapse collapse" role="tabpanel" aria-labelledby="collapse2">
      <div class="list-group">
        
        <a href="users_contribution.html" class="list-group-item"><span class="glyphicon glyphicon-qrcode"></span> 用户贡献总表</a>
        <a href=" user_con_subsidiary.html" class="list-group-item"><span class="glyphicon glyphicon-qrcode"></span> 用户贡献明细</a>

      </div>
    </div>
  </div>
  
  <!--3主播收入明细-->
  
  <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingFour">
      <h4 class="panel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapse3" aria-expanded="false" aria-controls="headingFour"><span class="glyphicon glyphicon-globe"></span>  主播收入 <span class="caret"></span></a></h4>
    </div>
    <div id="collapse3" class="panel-collapse collapse" role="tabpanel" aria-labelledby="collapse3">
      <div class="list-group">
        
        <a href="anchor_income.html" class="list-group-item"><span class="glyphicon glyphicon-user"></span> 主播收入总表</a>
        
        
        <a href="anchor_inc_subsidiary.html" class="list-group-item"><span class="glyphicon glyphicon-retweet"></span> 主播收入明细</a>
        
      </div>
    </div>
  </div>
  
  <!--4主播体现明细-->
  
  <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingFive">
      <h4 class="panel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapse4" aria-expanded="false" aria-controls="headingThree"><span class="glyphicon glyphicon-leaf"></span>  主播提现 <span class="caret"></span></a></h4>
    </div>
    <div id="collapse4" class="panel-collapse collapse" role="tabpane4" aria-labelledby="collapse4">
      <div class="list-group">
        
        <a href="anchor_tixian.html" class="list-group-item"><span class="glyphicon glyphicon-film"></span> 主播提现明细</a>
        
        
      </div>
    </div>
  </div>
  
  <!--5主播直播明细-->
  
  <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingSix">
      <h4 class="panel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapse5" aria-expanded="false" aria-controls="headingThree"><span class="glyphicon glyphicon-volume-up"></span>  主播直播明细 <span class="caret"></span></a></h4>
    </div>
    <div id="collapse5" class="panel-collapse collapse" role="tabpane5" aria-labelledby="collapse5">
      <div class="list-group">
        
        <a href="anchor_live.html" class="list-group-item"><span class="glyphicon glyphicon-list"></span> 主播直播明细</a>
        
        
        
      </div>
    </div>
  </div>
  
  <!--6直播明细-->
  
  <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingEnd">
      <h4 class="panel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapse6" aria-expanded="false" aria-controls="headingEnd"><span class="glyphicon glyphicon-cog"></span>  直播明细 <span class="caret"></span></a></h4>
    </div>
    <div id="collapse6" class="panel-collapse collapse" role="tabpanel" aria-labelledby="collapse6">
      <div class="list-group">
        
        <a href="live.html" class="list-group-item"><span class="glyphicon glyphicon-user"></span> 直播明细</a>
             
      </div>
    </div>
  </div>
  <!--7.回放明细-->
    <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingEnd">
      <h4 class="panel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapse7" aria-expanded="false" aria-controls="headingEnd"><span class="glyphicon glyphicon-cog"></span>  回放明细 <span class="caret"></span></a></h4>
    </div>
    <div id="collapse7" class="panel-collapse collapse" role="tabpanel" aria-labelledby="collapse7">
      <div class="list-group">
        
        <a href="playback.html" class="list-group-item"><span class="glyphicon glyphicon-user"></span> 回放明细</a>
             
      </div>
    </div>
  </div>
  <!--8.  用户违规处理明细-->
  <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingEnd">
      <h4 class="panel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapse8" aria-expanded="false" aria-controls="headingEnd"><span class="glyphicon glyphicon-cog"></span>  违规处理明细<span class="caret"></span></a></h4>
    </div>
    <div id="collapse8" class="panel-collapse collapse" role="tabpanel" aria-labelledby="collapse8">
      <div class="list-group">
        
        <a href="user_weigui.html" class="list-group-item"><span class="glyphicon glyphicon-user"></span> 违规处理明细</a>
             
      </div>
    </div>
  </div>
  <!--9.用户举报明细-->
    <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingEnd">
      <h4 class="panel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapse9" aria-expanded="false" aria-controls="headingEnd"><span class="glyphicon glyphicon-cog"></span>  用户举报明细 <span class="caret"></span></a></h4>
    </div>
    <div id="collapse9" class="panel-collapse collapse" role="tabpanel" aria-labelledby="collapse9">
      <div class="list-group">
        
        <a href="user_jubao.html" class="list-group-item"><span class="glyphicon glyphicon-user"></span> 用户举报明细</a>
             
      </div>
    </div>
  </div>
  <!--10.注册用户列表-->
    <div class="panel panel-default">
    <div class="panel-heading" role="tab" id="headingEnd">
      <h4 class="panel-title"><a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapse10" aria-expanded="false" aria-controls="headingEnd"><span class="glyphicon glyphicon-cog"></span>  注册用户列表 <span class="caret"></span></a></h4>
    </div>
    <div id="collapse10" class="panel-collapse collapse" role="tabpanel" aria-labelledby="collapse10">
      <div class="list-group">
        
        <a href="zhuce_user.html" class="list-group-item"><span class="glyphicon glyphicon-user"></span> 注册用户列表</a>
             
      </div>
    </div>
  </div>
  
</div>

    </div>
    <div class="main">   
        <h1 style="font-size:40px;margin-top:200px;font-family:'楷体';color:#bc000e;text-align:center">后台管理系统</h1>
    </div>
  </div>
</div>
<script>
$(function(){
  //时间
  $(".input_date").datetimepicker({
    step:1,
    lang:'ch',
  });
  //分页初始值
  var options = {
    currentPage: 1,//当前页数
    totalPages: 0,//总页数
    numberOfPages: 12,//做多显示page页
    bootstrapMajorVersion: 1,//版本
    alignment: "center",
    onPageClicked: function (e, originalEvent, type, page) {
      if (page > options.totalPages) {
        options.currentPage = options.totalPages;
      } else {
        options.currentPage = page;
      }
      var data=$('.search-form').serializeArray();
      data.push({name:'page',value:page});
      tradeList(data)
    }
  };
  //默认加载
  tradeList()
  //搜索
  $('.search').on('click',function(){
    var data=$('.search-form').serializeArray();
    options.currentPage=1
    tradeList(data);
  })
  //导出列表
  $("#exports").on("click", function () {
    window.location.href='/admin/get_tradeExcel?'+$('.search-form').serialize() 
  })
  function tradeList(data){
    effect.show()
    $.get('',data,function(result){
      if(result.code==200){
        $("table tbody").empty('');
          $("#tradetpl")
              .tmpl(result.message.list)
              .appendTo("table tbody");
          options.totalPages=result.message.pagecount;
          if (options.totalPages > 0) {
            $('#page').bootstrapPaginator(options);
          } else {
            $('#page').empty();
          }
        effect.hide();
      }else{
        effect.error();
        effect.hide()
      }
    })
  }
})

</script>
<script id="tradetpl" type="text/x-jquery-tmpl">
<tr>
    <td>${index}</td>
    <td>${act_buy_nickname}(${act_buy_uid})</td>
    <td>${act_no}</td>
    <td>${ac_id}{{if ul}}(${ul.ac_name}){{/if}}</td>
    <td>${act_num}</td>
    <td>${act_money}</td>
    <td>
      {{if act_pay_status==0}}
        <span class="btn btn-danger btn-xs">待支付</span>
      {{/if}}
      {{if act_pay_status==1}}
        <span class="btn btn-danger btn-xs">已支付</span>
      {{/if}}
    </td>
    <td>${createdAt}</td>
  </tr>
</script>
<div id="goTop" style="position: fixed;bottom: 40px;right: 20px;"><a class="btn btn-md btn-danger"><span class="glyphicon glyphicon-menu-up" style="font-size:20px"></span></a></div>
<div class="modal fade" id="modal_changepwd" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">修改密码</h4>
            </div>
            <div class="modal-body" style="overflow-y:auto">
                <div id="success_changepwd" class="tip alert alert-success fade in" style="display:none;">操作成功！</div>
                <div id="error_changepwd" class="tip alert alert-danger fade in" style="display:none;">参数非法！</div>
                <form name="change_form" id="change_form" method="post">
                    <div class="form-group">
        				<div id="group_post_title">
        					<label for="user_pass" class="control-label">旧密码<span id="msg_user_pass">*</span></label>
        					<input type="password" name="user_pass" id="user_pass" placeholder="必填" class="validate form-control">
        				</div>
        			</div>
                    <div class="form-group">
        				<div id="group_user_pass_new">
        					<label for="user_pass_new">新密码<span id="msg_user_pass_new">*</span></label>
        					<input type="password" name="user_pass_new" id="user_pass_new" value="" placeholder="必填" class="validate form-control">
        				</div>
        			</div>
                    <div class="form-group">
        				<div id="Div1">
        					<label for="user_pass_new_confim">确认密码<span id="msg_user_pass_new_confim">*</span></label>
        					<input type="password" name="user_pass_new_confim" id="user_pass_new_confim" value="" placeholder="必填" class="validate form-control">
        				</div>
        			</div>
                    <div class="form-group">
        				<button type="button" class="changepwd btn btn-danger center-block">保存</button>
                    </div>
                </form>

            </div>
        </div>
    </div>
</div>
<!-- 加载效果 -->
<div class="sk-circle" style="display:none">
  <div class="sk-circle1 sk-child"></div>
  <div class="sk-circle2 sk-child"></div>
  <div class="sk-circle3 sk-child"></div>
  <div class="sk-circle4 sk-child"></div>
  <div class="sk-circle5 sk-child"></div>
  <div class="sk-circle6 sk-child"></div>
  <div class="sk-circle7 sk-child"></div>
  <div class="sk-circle8 sk-child"></div>
  <div class="sk-circle9 sk-child"></div>
  <div class="sk-circle10 sk-child"></div>
  <div class="sk-circle11 sk-child"></div>
  <div class="sk-circle12 sk-child"></div>
</div>
<!-- 操作成功 -->
<div class="effectSuccess bg-success">
	<blockquote style="padding:0px 20px">
		<span class="glyphicon glyphicon-ok text-success" style="font-size:75px;display: inline-block;"></span>
		<p style="margin-left:65px;line-height:81px;display:inline-block;vertical-align: top;">操作成功</p>
	</blockquote>
</div>
<!-- 操作失败 -->
<div class="effectError bg-danger">
	<blockquote style="padding:0px 20px">
		<span class="glyphicon glyphicon-remove text-danger" style="font-size:75px;display: inline-block;"></span>
		<p style="margin-left:65px;line-height:81px;display:inline-block;vertical-align: top;">操作失败</p>
	</blockquote>
</div>
<!-- 遮罩层 -->
<div class="bg" style="display:none"></div>
<script>
	var effect={
		height:screen.height/4,
		width:screen.width/2,
		seep:1000,
		show:function(){
			$('.bg').show()
			$('.sk-circle').show()
		},
		hide:function(){
			$('.bg').hide()
			$('.sk-circle').hide()
		},
		success:function(message,db){
			if(arguments.length==0){
				$('.effectSuccess').fadeIn('slow', function() {
					$(this).fadeOut(this.seep)
				});
			}else if(arguments.length==1){
				var item=arguments[0]
				if($.isFunction(item)){	
					$('.effectSuccess').fadeIn('slow', function() {
						$(this).fadeOut(this.seep,item())
					});
				}else{
					$('.effectSuccess').find('p').html(item);
					$('.effectSuccess').fadeIn('slow', function() {
						$(this).fadeOut(this.seep)
					});
				}		
			}else{
				$('.effectSuccess').find('p').html(message);
				$('.effectSuccess').fadeIn('slow', function() {
					$(this).fadeOut(this.seep,db())
				});
			}
		},
		error:function(message,db){
			if(arguments.length==0){
				$('.effectError').fadeIn('slow', function() {
					$(this).fadeOut(this.seep)
				});
			}else if(arguments.length==1){
				var item=arguments[0]
				if($.isFunction(item)){	
					$('.effectError').fadeIn('slow', function() {
						$(this).fadeOut(this.seep,item())
					});
				}else{
					$('.effectError').find('p').html(message);
					$('.effectError').fadeIn('slow', function() {
						$(this).fadeOut(this.seep)
					});
				}		
			}else{
				$('.effectError').find('p').html(message);
				$('.effectError').fadeIn('slow', function() {
					$(this).fadeOut(this.seep,db())
				});
			}
		}
	}
	$('.sk-circle').css({
		'top':effect.height+'px',
		'left':effect.width+'px'
	})
</script>
<script>
$(function(){
    //返回顶部
    $("#goTop").hide();
    $(document).on('scroll',function(event) {
        $("#goTop").show();
        $("#goTop").on('click',function(event) {
            $('body').scrollTop(0);
        })
    });
    //全选功能
    $("[name='chkall']").click(function () {
        if ($(this).is(":checked")) {
            $(":checkbox").prop("checked",true);
        }else{
            $(":checkbox").prop("checked",false);
        }
    });
    //修改密码
    $(".changepwd").on("click", function () {
        $.post('/changepwd',$("#change_form").serializeArray(),function(result){
            if(result.code==200){
                location.href='login'
            }else{
                effect.error('操作失败')
            }
        })
    });
    //left
    var url = '/admin/trade';
    $("#accordion").find("a").each(function () {
        if (url.indexOf($(this).attr("href")) >= 0) {
            $(this).addClass("active");
            $(this).parent().parent().addClass("in");
        }else{
            $(this).parent().parent().removeClass("out")
        }
    })
})
</script>
</body>
</html>